<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<?php
    include_once('db.php');

?>


<html >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Saade: Captura de facturas de clientes</title>
        <link rel="stylesheet" type="text/css" href="css/index.css" />
        <link rel="stylesheet" type="text/css" href="css/form.css" />  
        <link rel="stylesheet" href="css/example.css" TYPE="text/css" MEDIA="screen">
        <link rel="stylesheet" type="text/css" href="http://static.flowplayer.org/tools/demos/dateinput/css/skin1.css"/>
        <script type="text/javascript" src="js/bsn.AutoSuggest_c_2.0.js"></script>
        <script src="js/jquery-1.2.6.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/tabber.js"></script>
        <script type="text/javascript">

            /* Optional: Temporarily hide the "tabber" class so it does not "flash"
            on the page as plain HTML. After tabber runs, the class is changed
            to "tabberlive" and it will appear. */

            document.write('<style type="text/css">.tabber{display:none;}<\/style>');
        </script>
        <script>
            function cerrar()
            {
                parent.$.fancybox.close();
            }
        </script>
        <script type="text/javascript" src="js/jquery.tools.min.js"></script>
        <script language="JavaScript" type="text/javascript">
            function Abrir_ventana (pagina) {
                var url = pagina;    
                var nombre_receta = document.ingrediente.nombre_ingrediente.value;    
                url = url + "?nombre_receta=" + nombre_receta;
                var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=315, height=465, top=85, left=140";
                window.open(url,"",opciones);
            }
        </script>
        <script>
            function actualiza_estereotipo(id)
            {
                valor=document.getElementById('nombre').value;
                parent.document.getElementById('registro-'+id).innerHTML=valor;
            }

            function regresa_editar_estereotipo(id,_valor)
            {
                parent.document.getElementById('registro-'+id).innerHTML=_valor;
                parent.$.fancybox.close();
            }

            function cerrar(){
                parent.$.fancybox.close();
            }

            function agregar_estereotipo(id,nombre)
            {

                newdiv = document.createElement('div');

                newdiv.innerHTML="<div class=\"record\" id=\"record-"+ id +"\"><span style=\"padding-left:35px;\"></span><strong>"+ id +".- <span id=\"registro-"+ id +"\">"+ nombre +"</span></strong><a href=\"?delete="+ id +"\" class=\"delete\"><img src=\"img/todo/borrar.png\" border=\"0\" ></a><a class=\"iframe example4\" href=\"modifica_medida.php?r="+ id +"\" style=\"float:right; padding-right: 15px;\" ><img class=\"last\" src=\"img/todo/editar.png\" border=\"0\" ></a></div>";   
                parent.document.getElementById('estereotipos_agregados').appendChild(newdiv);


                parent.$("a.example4").fancybox({
                    'opacity'        : true,
                    'overlayShow'    : false,
                    'width'    : 855,
                    'height'    : 220,
                    'padding' : 0,
                    'showCloseButton': false,
                    'transitionIn'    : 'elastic',
                    'transitionOut'    : 'elastic'
                });

            }
        </script>
    </head>
    <body style="margin: 0px; padding: 0px;" >
        <div class="header_fancy">
            <div class="cerrar_fancy" onclick="cerrar();"></div> 
            <p style="margin-left: 23px; padding-top: 20px; margin-top:0px">REGISTRAR PAGO DE FACTURA</p>

        </div>

        <table id="forma">
            <tr>
                <td>       
                    <div id="forma_ingredientes">
                        <form action="inserta_pago.php" enctype="multipart/form-data" method="POST" name="ingrediente" id="ingrediente">
                            <table align="center">
                                <tr>
                                    <td align="right" style="padding-right: 15px;"><div class="input_fancy">Fecha factura:</div></td>
                                    <td ><input type="date" class="idle_fancy" align="LEFT" size="20" name="fecha"  required="required" /></td>
                                </tr>
                                <tr>
                                    <td align="right" style="padding-right: 15px;"><div class="input_fancy">Empresa:</div></td>
                                    <td>
                                        <select name="empresa_b" id="empresa_b"  class="idle_fancy" >     
                                            <?php

                                                $result2 = mysql_query("SELECT * from empresa");
                                                while ($row2 = mysql_fetch_array($result2)) {
                                                    echo "<option value=\"".$row2['id_empresa']."\">".$row2['nombre']."</option>";
                                                }
                                            ?>
                                        </select>  
                                    </td>
                                </tr>
                            </table>
                            <br>
                            <span style="margin-left: 450px;"></span><input type="image" src="img/todo/buscar.png" > 

                        </form>
                        <br>
                    </div> 

                </td>
            </tr>
        </table>
        <script>
            $("#ingrediente").validator();
        </script>
        <script>
            $(":date").dateinput();
        </script>

    </body>
</html>